<div class="boxDlg300" >
	<div class="headerTitle">
    	<h3>Chỉnh sửa album</h3>
        <span><a href="javascript:closeUI();"><img src="{$smarty.const.HOST_STATICS}img/btn/close.png" width="10" height="10" alt="Close dialog" border="0"/></a></span>
    </div>
    <div class="dlg300Item">  
    	<div class="albumEdit">
        	<form method="post" name="frmAlbumEdit" id="frmAlbumEdit" action="{$smarty.const.HOST_VFRIEND}fullhouse/doalbumsave" enctype="multipart/form-data" autocomplete="off">
            	<input type="hidden" name="pdlgalbumid" id="pdlgalbumid" value="{$arrAlbum.albumid|base64E}" />
            	<input type="hidden" name="pdlgtoken" id="pdlgtoken" value="{$arrAlbum.albumid|secret:"albumEdit"}"/>
                <div class="userInput">
                    <label>Tên album ảnh:</label>
                    <input type="text" name="pdlgname" id="pdlgname" value="{$arrAlbum.name|escape}" onclick="this.value=''" onblur="if(this.value == '')this.value='{$arrAlbum.name|escape}';" maxlength="150" />
                </div>
                <div class="userInput">
                    <label>Hiển thị album với:</label>
                     <select class="select" name="pdlgperm" id="pdlgperm">
                        {html_options options=$arrPerm selected=$arrAlbum.perm}
                    </select>
                </div>
                <div class="sAction">
                    <input type="submit" value="Lưu thay đổi" class="btn" />
                    <input type="button" value="Hủy" class="btnCancel" onclick="javascript:closeUI();" />
                </div>
            </form>
        </div>  	
    </div>
</div>
<script type="text/javascript" language="javascript" src="{$smarty.const.HOST_STATICS}js/library/jquery.select.js?{$smarty.const.JS_UPDATE}"></script>
<script type="text/javascript" language="javascript" src="{$smarty.const.HOST_STATICS}js/library/init.js?{$smarty.const.JS_UPDATE}"></script>
<script type="text/javascript" language="javascript" src="{$smarty.const.HOST_STATICS}js/language/common.js?{$smarty.const.JS_UPDATE}"></script>
{literal}
	<script type="text/javascript" language="javascript">
    	$(document).ready(function(){
			$("#frmAlbumEdit").validate({
				errorClass		: "errorMessage",
				errorElement	: "span",
				onfocusout		: false,
				onkeyup			: false,
				rules: {
					pdlgname:{
						required	: true,
						minlength	: 5
					}
				},
				messages: {			
					pdlgname:{
						required	: album_name_required,
						minlength	: album_name_minlength
					}
				},
				errorPlacement: function(label, element) {
					var id = element.attr("id");	
					label.insertAfter($("#" + id));						
				},
				submitHandler: function(form) {							
					form.submit();
				}			 
			});	
		});
    </script>
{/literal}